<div id="content" class="friend">
    <h1><?=$data->TITLE?></h1>
    <? if($data->friend->onlines) foreach ($data->friend->onlines as $p):?>
    <div id="P<?=$p->ID?>" class="request">
        <? include 'apps/profile/template/mini.html'; ?>
        <span class="userName"><?=$p->fullname?></span><br />
        <div class="links">
            <a class="mini" href="javascript:remove(<?=$p->ID?>);" title="<?=_('remove from friends')?>"><?=_('Remove')?></a>
        </div>
        <div class="clear"></div>
    </div>
    <?endforeach;?>
    <div class="clear"></div>
</div>
<div id="aside"></div>
<script type="text/javascript">
    function remove(ID, c){
        if(c)
            tool.post({'url':'/json/friend/reject',
                'data':'friendID='+ID,
                'onComplete':function(e){
                    if(e.code==200) $('#P'+ID).fadeOut();
                    else return tool.result("<?=_('Alert')?>"
                    ,"<?=_('Please try again later..')?>",400);
                }
        });
        else
            tool.confirm('<?=_("Confirm")?>',
        '<?=_("Are you sure remove this person from friends?")?>'
        ,'remove('+ID+', 1)');
    }

</script>